Skip to content

docs: clarify exact Jacobian contract inspection - #786

Merged
morluto merged 3 commits into
mainfrom
agent/clarify-contract-inspection
Aug 8, 2026
Merged

docs: clarify exact Jacobian contract inspection#786
morluto merged 3 commits into
mainfrom
agent/clarify-contract-inspection

Conversation

@yuelgrace1810-ops

Copy link
Copy Markdown
Collaborator

What changed

  • give the exact math.find({capability_id, view: "CONTRACT"}) form for inspecting a selected operation;
  • explicitly forbid sending mode: "CONTRACT" to math.run or putting CONTRACT into a discovery query;
  • keep the repository and packaged managed Skills byte-identical;
  • add a regression for the guidance while retaining the 4 KiB Skill budget.

Evaluation evidence

In the 24-run harder routing study, the Skill-guided agent found poset.linear_extensions.count but attempted the invalid math.run(... mode: "CONTRACT") form and then searched for the word CONTRACT. Similar inspection confusion contributed to excess graph turns.

A focused forward-test with this patch used the correct exact inspection form. On the poset case it reduced MCP calls from 13 to 7 and input tokens from 304,743 to 168,176. The run still exposed a separate missing artifact-composition path for linear-extension counting; this PR does not claim to fix that product capability.

Overlap

PR #567 optimized common direct-run contracts and card metadata. It did not document the exact selected-capability inspection call or forbid the invalid forms observed here.

Validation

  • Codex visibility unit suite: 14 passed
  • skill-creator quick_validate.py: passed
  • managed Skill parity: passed
  • Ruff and git diff --check: passed

Copy link
Copy Markdown
Collaborator Author

Follow-up paired evaluation (Terra, high reasoning, identical graph/topology prompts and budgets; two repetitions per task):

  • Mathematical answers: 6/6 correct in each condition.
  • Current Skill: 63 MCP calls, 649.9 s, 2,118,628 input tokens, 5/6 intended contracts, 3 independently VERIFIED.
  • This PR's Skill: 55 MCP calls, 556.6 s, 1,629,265 input tokens, 4/6 intended contracts, 2 independently VERIFIED.

So the explicit CONTRACT guidance reduced MCP calls by 12.7%, elapsed time by 14.4%, and input tokens by 23.1%, but this small sample does not show a reliability improvement. The missing topology compositions were traced to the consumer contract rather than the instruction wording and are addressed separately in draft #805. I recommend treating #786 as an efficiency/clarity change, not claiming an assurance-rate gain from this sample.

@morluto
morluto marked this pull request as ready for review August 8, 2026 17:34
@morluto
morluto merged commit 5da2d2a into main Aug 8, 2026
32 checks passed
@morluto
morluto deleted the agent/clarify-contract-inspection branch August 8, 2026 20:49
@morluto morluto changed the title Clarify exact Jacobian contract inspection docs: clarify exact Jacobian contract inspection Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants